home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / stop-readahead < prev    next >
Encoding:
Text File  |  2006-10-20  |  864 b   |  39 lines

  1. #!/bin/sh -e
  2. # init script for stopping readahead profiling
  3.  
  4. # Check the package is still installed
  5. [ -x /sbin/readahead-list ] || exit 0
  6.  
  7. # Get LSB functions
  8. . /lib/lsb/init-functions
  9. . /etc/default/rcS
  10.  
  11. # This is only necessary if "profile" was on the kernel command-line,
  12. # and thus readahead-watch is running.
  13. grep -q "profile" /proc/cmdline || exit 0
  14.  
  15.  
  16. case "$1" in
  17.     start)
  18.     if [ -f /var/run/readahead-watch-boot.pid ]; then
  19.         /sbin/start-stop-daemon --stop --quiet --oknodo \
  20.         --pidfile /var/run/readahead-watch-boot.pid
  21.  
  22.         rm -f /var/run/readahead-watch-boot.pid
  23.     fi
  24.  
  25.     /sbin/start-stop-daemon --stop --quiet --oknodo \
  26.         --pidfile /var/run/readahead-watch.pid
  27.  
  28.     rm -f /var/run/readahead-watch.pid
  29.     ;;
  30.     stop|restart|force-reload)
  31.     ;;
  32.     *)
  33.     echo "Usage: /etc/init.d/stop-readahead {start|stop|restart|force-reload}"
  34.     exit 1
  35.     ;;
  36. esac
  37.  
  38. exit 0
  39.